{extend name="public/base" /}
{block name="container"}
<div class="panel panel-default">
    <div class="panel-heading">
      <h4 class="panel-title">修改菜单</h4>
  </div>
  <div class="panel-body panel-body-nopadding">

    <form class="form-horizontal form-bordered" id="submitForm" action="" method="post" >
        <div class="form-group">
            <label class="col-sm-3 control-label"><span>*</span>导航名称：</label>
            <div class="col-sm-6">
                <input type="text" class="form-control" placeholder="导航名称" name="title" value="{$data.menu_name ?? ''}"  required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label"><span>*</span>上级导航：</label>
            <div class="col-sm-6">
                <select class="select2" name="parentid" required>
                  <option value="0">一级分类</option>
                   {volist name="menu" id="vo"} 
                  <option value="{$vo.id}" {if condition="$data['pid'] eq $vo.id"} selected="selected"{/if}>{$vo.menu_name}</option>
                  {/volist}
              </select> 
          </div>
      </div>
      <div class="form-group">
        <label class="col-sm-3 control-label">所属部门</label>
        <div class="col-sm-6 wh-inline">
            <div class="ckbox ckbox-primary">
                {volist name="group" id="vo"}

                    <input type="checkbox" id="int_website" value="{$vo.id}" name="int[]" <?php if(in_array($vo['id'],$data['type'])){ echo 'checked="checked"';}?>  >
                    <label for="int_website">{$vo.title}</label>
                {/volist}
            </div>
            <!-- rdio -->
        </div>
    </div>
        <div class="form-group">
        <label class="col-sm-3 control-label">图标编号：</label>
        <div class="col-sm-6">
            <input type="text" class="form-control" placeholder="图标编号" name="icon" value="{$data.icon ?? ''}"  required>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><span>*</span>导航链接：</label>
        <div class="col-sm-6">
            <input type="text" class="form-control" placeholder="导航链接" name="url" value="{$data.url ?? ''}"  required>
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-3 control-label"><span>*</span>状态：</label>
        <div class="col-sm-6 wh-inline">
            <div class="rdio rdio-primary">
                <input type="radio" name="status" id="status-1" value="1" {if condition="$data['status'] eq 1"} checked="checked" {/if} required>
                <label for="status-1">启用</label>
                <input type="radio" name="status" id="status-0" value="0" {if condition="$data['status'] eq 0"} checked="checked" {/if} required>
                <label for="status-0">禁用</label>
            </div>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label">排序：</label>
        <div class="col-sm-6">
            <input type="number" class="form-control" placeholder="排序" name="orderid" value="{$data.orderid ?? ''}"  required>
        </div>
    </div>
    <div class="panel-footer">
       <div class="row">
          <div class="col-sm-6 col-sm-offset-3">
            <input type="hidden" name="id" value="{$data['id'] ?? ''}">
            <button type="submit" class="btn btn-primary">提交</button>
            <button type="button" class="btn btn-default" onclick="javascript:history.back(-1);">返回</button>
        </div>
    </div>
</div><!-- panel-footer -->

</form>

</div><!-- panel-body -->
{/block}
{block name="script"}

{/block}